package com.sikaryofficial.dataindicator.domain.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;


@Data
@CollectionName(value = "browseData")
public class BrowseData {
    @ID     //使用ID注解，标注此字段为MongoDB的_id，或者继承BaseModelID类
    private String id;
    /**
     * 上报时间戳
     */
    @ApiModelProperty(value = "时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Long rpTime;

    @ApiModelProperty(value = "时间，年月日", example = "2023-01-01")
    private String date;
    /**
     * 记录类型
     */
    @ApiModelProperty(value = "记录类型")
    private String type;
    /**
     * 路径
     */
    @ApiModelProperty(value = "路径")
    private String path;
    /**
     * 请求参数
     */
    @ApiModelProperty(value = "传参")
    private String params;

    @ApiModelProperty(value = "ip")
    private String ip;
    @ApiModelProperty(value = "国家")
    private String ipCountry;
    @ApiModelProperty(value = "省份")
    private String ipProvince;
    @ApiModelProperty(value = "城市")
    private String ipCity;

    /**
     * 来路
     */
    @ApiModelProperty(value = "来路")
    private String referer;
    @ApiModelProperty(value = "userAgent")
    private String userAgent;
    @ApiModelProperty(value = "设备")
    private String client;

    @ApiModelProperty(value = "用户id")
    private String userId;
    @ApiModelProperty(value = "用户名称")
    private String userName;
    @ApiModelProperty(value = "邮箱")
    private String userEmail;
}
